import asyncio
import aiohttp
from bs4 import BeautifulSoup

async def fetch(url):
    async with aiohttp.ClientSession() as session:
        async with session.get(url,ssl=False) as response:
            html = await response.text()
            soup = BeautifulSoup(html, 'html.parser')
            title = soup.title.string
            print(f"URL: {url}, Title: {title}")

async def main():
    urls = [
        "http://www.baidu.com",
        "https://www.qq.com",
        "https://www.sina.com"
    ]
    await asyncio.gather(*(fetch(url) for url in urls))

asyncio.run(main())
